<script setup>
import { reactive } from 'vue'

        let msg = "今天天气真不错"
        let count = 0

        const stu = reactive({
            name:"孙悟空",
            age:18,
            gender:"男",
        })

        function changeage(){
            stu.name = "猪八戒"
        }

</script>

<template>
    <h1>组合式API</h1>
    <h2>{{ msg }}</h2>
    <button @click="changeage()">点我一下</button>
    <h2>{{ stu.name }}--{{ stu.age }}--{{ stu.gender }}</h2>
</template>